
layui.use(['form', 'layer', 'laydate', 'table', 'upload'], function(){

    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        laydate = layui.laydate,
        upload = layui.upload,
        table = layui.table;

    var detail_url = $('.detail_url').val();

    laydate.render({
        elem: '#test16',
        type: 'datetime',
        range: '到',
        format: 'yyyy年M月d日H时m分s秒'
    });


    // Table 列表
    var tableIns = table.render({
        elem: '#dataTable',
        url : detail_url,
        page : true,
        cellMinWidth : 95,
        //height : "full-100",
        limit : 10,
        limits : [10, 20, 50, 100],
        id : "dataTable",
        cols : [[
            /* {type: "checkbox", fixed:"left", width:50},*/
            {field: 'key', title: '序号', width:80, align:"center"},
            {field: 'name', title: '活动主题', minWidth:240},
            {field: 'f_name', title: '副标题', align:'center'},
            {field: 'mName', title: '推送对象', align:'center'},
            {field: 'start_time', title: '开始时间', align:'center', minWidth:110, sort: true},
            {field: 'end_time', title: '结束时间', align:'center', minWidth:110, sort: true},
            {field: 'create_date', title: '推送时间', align:'center', minWidth:110, sort: true},
            /*{title: '操作', minWidth:175, templet:'#handleBar', fixed:"right", align:"center"},*/
            {title: '操作', fixed:"right", align:"center", minWidth:140, templet:function(data){
                    var html = '';
                    //html += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" href="'+edit_url+'?id='+data.id+'"><i class="layui-icon layui-icon-edit"></i>编辑</a>';
                    html += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>';
                    /*html += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>';*/

                    return html;
                }}
        ]]
    });


});